define(function(){
    return function(res,goodsMsg,tbody){
        let str = "";
            // 读取商品总数据
            for(let i=0;i<res.length;i++){
                // 读取本地存储数据
                    // 根据本地存储数据，比对商品总数据，获取到真正要渲染的数据
                    if(res[i].proId === goodsMsg[goodsMsg.length-1].id){
                        // console.log(this.res[i], this.goodsMsg[j].num);
                        // 拼接页面结构
                        str += `<div class="details-top">
                <span><a href="#">中图网</a>&nbsp;&gt;&nbsp;<a href="#">文学</a>&nbsp;&gt;&nbsp;<a href="#">中国现当代随笔</a>&nbsp;&gt;&nbsp;${res[i].bookName}</span>
            </div>
            <div class="details-left">
                         <div class="details-left-img"><img src="${res[i].urlImg}" alt=""> <div class="details-l-r-xhk"></div></div><div class="details-l-r">
                        <div class="details-l-r-t">
                        <h2>${res[i].bookName}</h2>
                        <div class="details-l-r-t-d1">${res[i].introduce}</div>
                        <span class="details-l-r-t-s">作者：<ahref="#">${res[i].author}</a></span>
                        <span class="details-l-r-t-s">原价：<ahref="#">${res[i].oPrice}</a></span>
                        <span class="details-l-r-t-s">现价：<ahref="#">${res[i].cPrice}</a></span>
                        <div class="details-l-r-t-d2">加入购物车<div> 
                        </div>
                        <div class="details-l-r-fdj">
                        <img class="details-l-r-fdj-img" src="${res[i].urlImg}" alt="">
                    </div>
                        </div>
                        </div>`;
                    
                    }
                
            }
            // 6. 填充到页面
            tbody.innerHTML = str;

    }
})